

{if $hotel_id!=0}
<h2 >Gian hàng: <a href="manage_booth_menu.html?booth_id={$hotel_id}">{$hotel_name}</a></h2>
{/if}
<br/>

<h4>{if !$hotel_id}<a href="manage_booth.html">{/if}Quản lý thực đơn {if !$hotel_name}</a>{/if}
    <select name="status" onchange="window.location = 'manage_booth_menu.html{if $hotel_id}?booth_id={$hotel_id}{/if}' + (this.value != 0 ? '{if $hotel_id}&{else}?{/if}status=' + this.value : '');">{$status_option}</select>
    <div class="fr">
        [<a href="manage_booth.html">Quản lý gian hàng</a>]
    </div>
</h4>
<br/>
<div align="center">
{$msg}
</div>
<input type="hidden" id="act" name="act" value="">

{$paging}

<table width="99%" bordercolor="#CCCCCC" border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse;margin: 20px auto">
    <tr>
        <td {if $hotel_id==0}colspan="16"{else}colspan="15"{/if} align="left">
            [ <a href="manage_booth_menu.html?cmd=add{if $hotel_id}&booth_id={$hotel_id}{/if}&href={$href}">Thêm thực đơn mới</a> ]


            <div class="c"></div>
        </td>
    </tr>

    <tr bgcolor="#EFEFEF">
        <th width="24" title="check_all"><input type="checkbox" value="1" id="ManageRoomListForm_all_checkbox" onclick="selectAllCheckbox(this.form, 'ManageRoomListForm',this.checked,'#FFFFEC','white');" /></th>
        <th>Id</th>
        {if $hotel_id==0}
            <th>Gian hàng</th>
        {/if}
        <th>Tên thực đơn</th>
        <th>Ảnh to</th>
        <th>Ảnh nhỏ</th>
        <th>Giá hiện tại</th>
        <th>Giới thiệu</th>

    </tr>
    {if $rooms}
        {foreach from=$rooms key=k item=room}
        <tr {if $k%2} bgcolor="#f0f0f0"{/if}>
          <td align="center"><input name="selected_ids[]" type="checkbox" value="{$room.id}" onclick="select_checkbox(this.form,'ManageRoomListForm',this,'#FFFFEC','white');" /></td>
          <td align="center">{$room.id}</td>
            {if $hotel_id==0}
            <td>[{$room.booth_id}] <a href="manage_booth_menu.html?hotel_id={$room.hotel_id}">{$hotels[$room.hotel_id].name}</a></td>
            {/if}
            <td>{$room.name}</td>
            <td align="right"><img src="{$smarty.const.STATIC_URL}{$room.img_lager}" width="100px" alt=""></td>
            <td align="right"><img src="{$smarty.const.STATIC_URL}{$room.img_small}" width="50px" alt=""></td>
            <td align="right">
                {$room.price|price_format}
            </td>

            <td align="left">{$room.desc}</td>
            <td align="center">
            {if $room.status==1}<font color="#0066FF">Hiện</font>{elseif $room.status==2}<font color="#FF6600">Đang ẩn</font>{elseif $room.status==-1}<font color="#FF0000">Đã xóa</font>{/if}<br />

            
            {if $room.status==1}
                [<a href="manage_booth_menu.html?cmd=hide&id={$room.id}&booth_id={$room.booth_id}&href={$href}">Ẩn</a>]
            {elseif $room.status==2}
                [<a href="manage_booth_menu.html?cmd=show&id={$room.id}&booth_id={$room.booth_id}&href={$href}">Hiện</a>]
            {elseif $room.status==-1}
                [<a href="manage_booth_menu.html?cmd=restore&id={$room.id}&booth_id={$room.booth_id}&href={$href}">Khôi phục</a>]
            {/if}
            </td>
            <td nowrap="nowrap">
                [<a href="manage_booth_menu.html?cmd=edit&id={$room.id}&booth_id={$room.booth_id}&href={$href}">Sửa</a>]
                
                [<a href="manage_booth_menu.html?cmd=delete&id={$room.id}&booth_id={$room.booth_id}&href={$href}" onclick="return confirm('Bạn có chắc chắn muốn xóa không?');"><font color="#FF0000">Xóa</font></a>]

            </td>
        </tr>
        {/foreach}
    {else}
    <tr>
        <td colspan="16" align="center">
         	Không tìm thấy thực đơn nào
        </td>
    </tr>    
    {/if}
</table>

{$paging}

<script language="JavaScript" type="text/javascript">
{literal}
{/literal}
</script>